package com.example.nettyudp.server;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.nio.NioDatagramChannel;

/**
 * @author FDJ,
 * @date 2020/5/26,
 * @time 9:42
 */
public class ServerChannelInitializer extends ChannelInitializer<NioDatagramChannel> {

    @Override
    protected void initChannel(NioDatagramChannel nioDatagramChannel) throws Exception {
        //添加编解码
//        nioDatagramChannel.pipeline().addLast("decoder", new StringDecoder(CharsetUtil.UTF_8));
//        nioDatagramChannel.pipeline().addLast("encoder", new StringEncoder(CharsetUtil.UTF_8));
//        nioDatagramChannel.pipeline().addLast(new NettyServerHandler());
    }
}
